import request from '@/utils/request.js'
const PATH = '/user/remark'

// 添加评论
export const addRemark = (data) => request.post(PATH + '/addRemark', data)

// 查询评论列表
export const getRemarkList = ({ page, pageSize, type, typeId }) =>
  request.get(PATH + '/getRemarkList', {
    params: { page, pageSize, type, typeId }
  })

// 删除评论
export const deleteRemark = (remarkId) =>
  request.delete(PATH + '/deleteById', { params: { id: remarkId } })

// 点赞
export const thumbs = ({ remarkId, isThumbs }) =>
  request.put(PATH + `/thumbs/${remarkId}/${isThumbs}`)
